home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / applic / ncsa / Mac / Telnet2.6 / prerelease / d5 / Telnet 2.6.1d5.src.sit.hqx / Telnet 2.6.1d5 src / source / rs / rsdefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-21  |  3.2 KB  |  91 lines

  1. /*------------------------------------------------------------------------------*/
  2. /* RSDEFS.H                                                                        */
  3. /* This is the defines file for rsmac.c.  There are enough defines and structs    */
  4. /* to merit putting them into a separate file, so I have done so    -SMB        */
  5.  
  6.  
  7. /*-------------------------------------------------------------------------*/
  8. /* some defines for easy structure access */
  9. #define FHeight RSlocal[w].fheight
  10. #define    Fascent    RSlocal[w].fascent
  11. #define FWidth RSlocal[w].fwidth
  12. #define    FONT RSlocal[w].fnum
  13. #define FSIZE RSlocal[w].fsiz
  14. #define FRight RSlocal[w].width
  15. #define RMAXWINDOWWIDTH (width)*FWidth+16 - (CHO)
  16. #define RMAXWINDOWHEIGHT (lines)*FHeight+16
  17.  
  18. /* the different cursor types */
  19. #define BLOCKCURSOR                0    /* BYU 2.4.11 */
  20. #define UNDERSCORECURSOR        1    /* BYU 2.4.11 */
  21. #define VERTICALCURSOR            2    /* BYU 2.4.11 */
  22.  
  23. /*  Capable of shifting the text to the right some # of pixels        */
  24. #define CVO 0
  25. #define CHO -3
  26.  
  27. #define INFINITY    20000        // Will screens ever be this large?
  28.  
  29.  
  30. /*------------------------------------------------------------------------*/
  31. /* Now we have some externs, packed away neatly from the rest of the code */
  32. extern TelInfoRec *TelInfo;
  33. extern short scrn;                    /* shut up, Tim */
  34. extern char *tempspot;
  35. extern MenuHandle myMenus[];
  36.  
  37.  
  38. /*--------------------------------------------------------------------------*/
  39. /* Time to define the big RS structure.  RSdata holds the font and screen     */
  40. /* specific stuff.  Basically all the ugly stuff you wouldnt otherwise         */
  41. /* care to look at                                                            */
  42.  
  43. struct RSdata {
  44.     OSType        id;            // RSDA
  45.     Rect        textrect;    /* Where the text is in the window */
  46.     Rect        cursor;        /* Cursor rectangle */
  47.     WindowPtr    window;        /* Window pointer */
  48.     PaletteHandle    pal;    /* My Palette */
  49.     char        cursorstate,/* BYU 2.4.11 - 0 is invisible, 1 is visible */
  50.                 selected;    /* BYU 2.4.11 - text is selected */
  51.     Point        last,
  52.                 anchor;
  53.     short        topline,
  54.                 leftmarg;    /* leftmost visible column position */
  55.     short        rheight,    /* Real window dimensions */
  56.                             /* adjusted to not include CHO boundary - TK 12/88 */
  57.                 rwidth;
  58.     short        height,
  59.                 width;        /* Window Dimensions rounded to the nearest character */
  60.     char        color[4];    /* color scheme for this machine's sessions */
  61.     Boolean        flipped;    /* Set when we've reversed normal fg and bg colors */
  62.     RGBColor    RGBs[4];    /* RGB Colors for window */
  63.     ControlHandle
  64.         left,        /* The CH for the left margin */
  65.         scroll;        /* The CH for the scroll bar */
  66.     short
  67.         min,        /* Minimum vertical scrollbar value (number of lines in screen buffer and scrollback) */
  68.         max,        /* Maximum vertical scrollbar value */
  69.         current,    /* current vertical scrollbar value */
  70.         lmin,        /* Minimum horizontal scrollbar value (always 0) */
  71.         lmax,        /* Maximum horizontal scrollbar value (number of columns not visible) */
  72.         lcurrent;    /* current horizontal scrollbar value (leftmost visible column) */
  73.     short
  74.         fascent,    /* Font Ascent */
  75.         fnum,        /* Font ID */
  76.         fsiz,        /* Font Size */
  77.         fheight,    /* Font Height/character */
  78.         fwidth,        /* Font Width /character */
  79.         monospaced;    /* Font is monospaced */
  80.     Boolean
  81.         skip;        /* TRUE if we are skipping the output */
  82.  
  83.     };
  84.  
  85. typedef struct RSdata RSdata;
  86.  
  87. #define    MYSETRECT(a,b,c,d,e)    a.left = b; \
  88.                                 a.top = c;\
  89.                                 a.right = d;\
  90.                                 a.bottom = e;\
  91.